With the rapid development of Internet, for meeting requirements of different customers and different types of service traffic for accessing an IP network, different networking technologies are required to be adopted; at present, the Ethernet is applied widely, and it belongs to a local area network technology; however, branches of many large enterprises are distributed in different places, therefore it is needed to adopt a network technology to connect them with each other and ensure a certain degree of privacy. At present, an MPLS L2VPN is adopted universally to achieve that purpose, as is shown in FIG. 1. A communication process of a message sent by a Customer Edge 1 (CE1) in an MPLS L2VPN is given below as an example for illustration.
With reference to FIG. 1, message transmission from CE1 to CE2 needs to traverse the MPLS L2VPN; and the message transmission needs the following three steps: 1, a customer layer 2 Ethernet message is made to access a Provider Edge 1 (PE1) and forwarded to a Provider (P) device; 2, a Multi-protocol Label Switching (MPLS) message is forwarded to the PE1 through the intermediate P device; 3, the MPLS message is ended at a PE2 and forwarded to the CE2.
Step 1 is a forwarding process of making an Ethernet message of the CE1 access the PE1; first, it is required to establish a Virtual Switch Interface (VSI) on the PE1; a customer message accesses the VSI through a port, a Virtual Local Area Network (VLAN) or QinQ; an source Medium Access Control (MAC) address is learned at the port or in the VLAN; then, an MAC address table is looked up according to a destination MAC address, and an output port and a VLAN of the destination MAC address are checked; after an output port of the next hop is found, a Virtual Circuit (VC) label, a tunnel label and layer 3 link information are encapsulated and forwarded to the P device;
Step 2 is a forwarding process of the MPLS message in the P device; the P device only performs label switching on the MPLS message, namely, only modifying the outmost message header and tunnel label, while the VC label and an inner customer message are kept unchanged; if the P device is a Penultimate Hop Popping (PHP) node, the outer tunnel label pops up;
Step 3 is a forwarding process of ending the MPLS message at the PE2 and forwarding it to the CE2; supposing that the tunnel label pops up at the P device, the MPLS message is forwarded at the PE2 to a corresponding VSI according to the VC label; the VC label is detached, and the source MAC address of the customer message is learned to find a VC interface; then, the output port and VLAN are found according to a destination MAC address of the inner customer message, and the MPLS message is forwarded to the corresponding CE2.
In the above process that an Ethernet customer message of a CE traverses the MPLS L2VPN, there are many modes of making the customer message access the VSI, is such as through a Port, or a VLAN, or QinQ, or a Port and a VLAN, or a Port and QinQ, and the modes can also an MPLS access mode. Because there are a variety of access types of a L2VPN, it is needed to look for different interface types during MAC address learning and forwarding, which results in the complexity of implementing the L2VPN on the PE and poor extensibility of accessing, and decreases the system reliability.